package com.tentinet.testtapsviewpager.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.tentinet.testtapsviewpager.R;

/**
 * <h3>Description</h3>
 * TODO
 * <h3>Author</h3>
 * <h3>Date</h3> 2016/1/25 14:18
 * <h3>Copyright</h3> Copyright (c)2016 Shenzhen  Technology Co., Ltd. Inc. All rights reserved.
 */
public class TestFragment extends Fragment {
    private View fragment_layout;
    private TextView fragment_txt;
    public static final String FRAGMENT_KEY = "fragment_key";
    private  String content;
    public TestFragment() {
    }
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        fragment_layout = inflater.inflate(R.layout.fragment_layout,container,false);
        initView();
        initData();
        return fragment_layout;
    }
    private void initView() {
        fragment_txt = (TextView) fragment_layout.findViewById(R.id.fragment_txt);

    }
    private void initData() {
        Bundle bundle = getArguments();
        content = bundle.getString(FRAGMENT_KEY);
        fragment_txt.setText(content);
    }
}
